package com.hdax.service.Impl;

import com.hdax.entity.Leave;
import com.hdax.mappers.LeaveMapper;
import com.hdax.service.LeaveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 离开服务impl
 *
 * @author Aizen
 * @date 2022/06/04
 */
@Service
public class LeaveServiceImpl implements LeaveService {

    @Autowired
    private LeaveMapper leaveMapper;

    @Override
    public List<Leave> findAll(int offset, int limit, Leave leave) {
        return leaveMapper.findAll(offset,limit,leave);
    }

    @Override
    public int insertByid(Leave leave) {
        return leaveMapper.insertByid(leave);
    }

    @Override
    public int updateByid(Leave leave) {
        return leaveMapper.updateByid(leave);
    }

    @Override
    public List<Leave> findByRoleid(int departmentid) {
        return leaveMapper.findByRoleid(departmentid);
    }

    @Override
    public Leave findBylid(int id) {
        return leaveMapper.findBylid(id);
    }
}
